package cn.dgut.training.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.stereotype.Component;

@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ApiModel(value="Region对象", description="行政区域表")
public class Region extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "行政区域父ID，例如区县的pid指向市，市的pid指向省，省的pid则是0")
    private Integer pid;

    @ApiModelProperty(value = "行政区域名称")
    private String name;

    @ApiModelProperty(value = "行政区域类型，如如1则是省， 如果是2则是市，如果是3则是区县")
    private Integer regionType;

    @ApiModelProperty(value = "行政区域编码")
    private Integer code;

}
